<%@page import="java.util.LinkedList"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="GetData.DataWS"%>
<%@page import="dktc_ws.Quantri"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<% request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    response.setContentType("text/html; charset=UTF-8"); 
%>

<script>
    function getXmlhttp()
    {
        var xmlhttp;
        if (window.XMLHttpRequest)
            xmlhttp=new XMLHttpRequest();
        else
          {
          xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        return xmlhttp;
    }
    
    function deleteAccount(id)
    {
        var xmlhttp=getXmlhttp();
        xmlhttp.onreadystatechange=function()
        {
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
                loadData();
        }
        
        xmlhttp.open("GET","account/delete_account.jsp?id="+id,true);
        xmlhttp.send();
        loadData();
    }
function loadData()
{
var xmlhttp = getXmlhttp();
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
        document.getElementById("table-body").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","account/query_account.jsp?id=-1",true);
xmlhttp.send();
}

$(document).ready(function(){
    loadData();
});
</script>


<h2>Danh sách tài khoản quản trị</h2>  

<table id="rounded-corner" summary="">
    <thead>
    <tr>
            <th scope="col" class="rounded-company">  </th>
            <th scope="col" class="rounded">Tên tài khoản</th>
            <th scope="col" class="rounded">Email</th>
             <th scope="col" class="rounded">Sửa</th>
              <th scope="col" class="rounded-q4">Xóa</th>
        </tr>
    </thead>       
    <tbody id="table-body"> 
    
    </tbody>
</table>
<a href="?page=add_account" class="bt_green"><span class="bt_green_lft"></span><strong>Thêm Tài khoản</strong><span class="bt_green_r"></span></a> 
     <!--a href="#" class="bt_blue"><span class="bt_blue_lft"></span><strong>View all items from category</strong><span class="bt_blue_r"></span></a--> 
